Skip to content

Conversation

@OussamaSaoudi
Copy link
Collaborator

@OussamaSaoudi OussamaSaoudi commented Nov 19, 2025

🥞 Stacked PR

Use this link to review incremental changes.


What changes are proposed in this pull request?

How was this change tested?

Comment on lines +135 to +138
batch_result.and_then(|batch| {
self.sidecar_visitor.visit_rows_of(batch.actions())?;
Ok(batch)
})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
batch_result.and_then(|batch| {
self.sidecar_visitor.visit_rows_of(batch.actions())?;
Ok(batch)
})
let batch = batch_result?;
self.sidecar_visitor.visit_rows_of(batch.actions())?;
Ok(batch)

Comment on lines +81 to +84
ext => {
return Err(Error::generic(format!(
"Unsupported checkpoint extension: {}",
ext
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ext => {
return Err(Error::generic(format!(
"Unsupported checkpoint extension: {}",
ext
_ => {
return Err(Error::generic(format!(
"Unsupported checkpoint extension: {extension}",

Comment on lines +71 to +80
"json" => {
engine
.json_handler()
.read_json_files(&files, MANIFEST_READ_SCHMEA.clone(), None)?
}
"parquet" => engine.parquet_handler().read_parquet_files(
&files,
MANIFEST_READ_SCHMEA.clone(),
None,
)?,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aside: I'm a bit surprised fmt treated these so differently?
(but it's the same number of lines of code either way, so meh)

.path()
.rsplit('.')
.next()
.unwrap_or("");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, we don't need to unwrap... just match as:

let actions = match extension {
    Some("json") => { ... }
    Some("parquet") => { ... }

#[allow(unused)]
pub(crate) enum AfterManifest {
/// Has sidecars → return sidecar files
Sidecars { sidecars: Vec<FileMeta> },
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a reasonable place for a tuple enum variant, since the field name is redundant?

Suggested change
Sidecars { sidecars: Vec<FileMeta> },
Sidecars(Vec<FileMeta>),

require!(
self.is_complete,
Error::generic(format!(
"Finalized called on ManifestReader for file {:?}",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"Finalized called on ManifestReader for file {:?}",
"Cannot finalize in-progress ManifestReader for file {:?}",

))
);

let sidecars: Vec<_> = self
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type annotation shouldn't be necessary here because AfterManifest::Sidecars forces it

Suggested change
let sidecars: Vec<_> = self
let sidecars = self

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants